#include "Johnson.hpp"
#include <ctime>

#define N_VERTEX 27

void run(){
    time_t time = 0;
    vector<vector<int>> weight;
    for (size_t i = 0; i < N_VERTEX; i++)
    {
        vector<int> row;
        for (size_t j = 0; j < N_VERTEX; j++)
        {
            int a;
            scanf("%d,", &a);
            row.push_back(a);
        }
        weight.push_back(row);
    }

    for (size_t i = 0; i < 100; i++)
    {
        auto w = weight;
        auto G = Weight_Directed_Graph(w);
        auto J = Johnson();
        time_t begin, end;
        begin = clock(); 
        auto D_PI = J.run_Johnson(&G, &w);
        end = clock();
        if (i == 99)
        {
            J.output_Johnson_result(&D_PI);
        }
        time += end - begin;
    }
    cout << "time =" << time << endl;
}

int main(){
    run();
}